/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package controller;

/**
 *
 * @author Juan
 */
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class ConexionDB {
     static final String USER = "root";
     static final String PASSWORD = "juan566";//cada quien reactualiza su clave root
     static final String CONTROLADOR = "com.mysql.jdbc.Driver";
     static final String URL_BASEDATOS = "jdbc:mysql://localhost/basepoker";

    public Connection establecerConexion(){
        Connection conexion = null;
        try {
            Class.forName(CONTROLADOR);
            conexion = DriverManager.getConnection(URL_BASEDATOS, USER, PASSWORD);
        } catch(ClassNotFoundException  ex){} 
        catch(SQLException ex){}
        return conexion;
    }
}